package com.feng.zhongji.service;

import com.feng.zhongji.bean.User;
import com.feng.zhongji.mapper.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserService {
    @Autowired
    private UserMapper userMapper;//@Component//*Mapper上这个注解可以不用添加（但是那样会产生波浪红线）
    public List<User> AllUser(){
        List<User> allUser = userMapper.getAllUser();
        System.out.println(allUser);
        return allUser;
    }
}
